import { http, httpFormData} from '/request.js'
var url={
  getOpenid:'/app/wechat/login',/**获取openid */
  login: '/app/tenant/wechatLogin',/**租客端登录 */
  getAppBanner: '/app/common/getAppBanner',/***获取APP-Banner集合*/
  getAddressByGeocoder:'/app/common/getAddressByGeocoder',/**根据经纬度获取城市 */
  getTencentMapDistrict: '/app/common/getTencentMapDistrict',/**获取腾讯地图行政区域信息 */
  homeStayList: '/app/tenant/store/queryPage', /**民宿列表查询*/
  browseStore: '/app/tenant/store/browseStore', /**民宿浏览接口*/
  storeIntros: '/app/tenant/store/getIntros', /**民宿介绍查询*/
  storeDtl: '/app/tenant/store/getStoreDtl', /**查询民宿基本信息*/
  getTencentMapKey: "/app/common/getTencentMapKey",/**获取腾讯地图MapKey */
  getProdByStoreNo: "/app/tenant/prod/getProdByStoreNo",/**查询民宿代金券 */
  collectorInfo: '/app/tenant/col/getColDtl',/**收藏信息查询*/ 
  colStore: '/app/tenant/col/colStore',/**民宿收藏接口 */
  cancelColStore: '/app/tenant/col/cancelColStore',/**取消民宿收藏接口 */
  buyProd: '/app/tenant/order/buyProd',/**代金券购买*/
  getWxOrder: '/app/tenant/order/getWxOrder',/**获取微信支付信息 */
  orderList:'/app/tenant/order/queryOrderPage',/**订单列表 */
  myVouchersList: '/app/tenant/prod/queryMyProPage', /**我的代金券列表 */
  vouchersDetail: '/app/tenant/prod/getProdById',/**查询代金券详情 */
  collectList: '/app/tenant/col/queryPage',/**我的收藏接口列表 */
  getQRCode:'/app/tenant/other/QRCode.jpg',/**获取二维码 */
  langlordLogin:'/app/landlord/wechatLogin',/**房东登录 */
  sendCode:"/app/common/sendCode",/**发送短信验证码 */
  updateOwnFile:'/app/landlord/updateOwnFile',/**完善房东信息 */
  totalOwnHomePage: '/app/landlord/acct/totalOwnHomePage',/**房东首页统计**/
  getStoreCount: '/app/landlord/store/getStoreCount',/**统计房东民宿数量 */
  sweepCode: "/app/landlord/acct/sweepCode",/** 房东扫码消费*/
  mystoreList:'/app/landlord/store/queryPage',/**我的名宿列表 */
  queryAcctOutPage: '/app/landlord/acct/queryAcctOutPage',/**消费代金券列表 */
  queryAcctInPage: '/app/landlord/acct/queryAcctInPage',/**账户充值列表 */
  updateInStat:'/app/landlord/acct/updateInStat',/**修改名宿状态 */
  getScanInfo: '/app/tenant/other/getScanInfo',/**获取扫码信息 */
  storeGetIntros: '/app/landlord/store/getIntros',/**房东端民宿介绍查询 */
  storeGetStoreDtl: '/app/landlord/store/getStoreDtl',/**房东端查询民宿基本信息 */
  changeStoreStatus: '/app/landlord/store/updateStoreStat',/**修改民宿状态 */
  changeStorePrice: '/app/landlord/store/updatePrice',/**修改民宿价格 */
  getPopularSearches:'/app/tenant/other/getPopularSearches',/**热门搜索 */
  saveEvaluate:'/app/tenant/judge/save',/**提交评价 */
  evaluateList:'/app/tenant/judge/queryPage',/**评价列表 */
  activityList:'/app/tenant/ac/queryPage',/**活动列表 */
  getActivityInfo:'/app/tenant/ac/getActivityInfo',/**查询活动信息 */
  getCustAcNum: '/app/tenant/ac/getCustAcNum',/**查询客户该活动参与次数 */
  buyAcProd: '/app/tenant/ac/buyAcProd',/**活动代金券购买、领取 */
  getHomepageAc: '/app/tenant/ac/getHomepageAc'/**获取主页提示活动 */

}
module.exports={
  getTencentMapKey(){
    return http({
      url: url.getTencentMapKey,
    })
  },
  getTencentMapDistrict(){
    return http({
      url: url.getTencentMapDistrict,
      method: 'POST',
    })
  },
  getAddressByGeocoder(data){
    return http({
      url: url.getAddressByGeocoder,
      data
    })
  },
  getAppBanner(){
    return http({
      url: url.getAppBanner,
    })
  },
  getOpenId(data){
    return http({
      url: url.getOpenid,
      method:'POST',
      header:{
        "Content-Type": "application/x-www-form-urlencoded"
      },
      data
    })
  },
  login(data) {
    return http({
      url: url.login,
      method: 'POST',
      data
    })
  },
  homeStayList(data){
    return http({
      url: url.homeStayList,
      method: 'POST',
      data
    })
  },
  browseStore(data){
    return http({
      url: url.browseStore + data,
      method: 'POST',
    })
  },
  storeIntros(data){
    return http({
      url: url.storeIntros,
      data
    })
  },
  storeDtl(data){
    return http({
      url: url.storeDtl,
      data
    })
  },
  getProdByStoreNo(data){
    return http({
      url: url.getProdByStoreNo,
      data
    })
  },
  collectorInfo(data){
    return http({
      url: url.collectorInfo,
      method: 'POST',
      data
    })
  },
  colStore(data){
    return http({
      url: url.colStore,
      method: 'POST',
      data
    })
  },
  cancelColStore(data) {
    return http({
      url: url.cancelColStore,
      method: 'POST',
      data
    })
  },
  buyProd(data){
    return http({
      url: url.buyProd,
      method: 'POST',
      data
    })
  },
  getWxOrder(data){
    return http({
      url: url.getWxOrder,
      data
    })
  },
  orderList(data){
    return http({
      url: url.orderList,
      method: 'POST',
      data
    })
  },
  myVouchersList(data){
    return http({
      url: url.myVouchersList,
      method: 'POST',
      data
    })
  },
  vouchersDetail(data){
    return http({
      url: url.vouchersDetail,
      data
    })
  },
  collectList(data){
    return http({
      url: url.collectList,
      method: 'POST',
      data
    })
  },
  langlordLogin(data){
    return http({
      url: url.langlordLogin,
      method: 'POST',
      data
    })
  },
  sendCode(data){
    return http({
      url: url.sendCode + data,
      method: 'POST' 
    })
  },
  updateOwnFile(filePath,data){
    return httpFormData({
      url: url.updateOwnFile,
      method: 'POST',
      filePath: filePath,
      formData: data
    })
  },
  totalOwnHomePage(data){
    return http({
      url: url.totalOwnHomePage,
      data
    })
  },
  getStoreCount(data){
    return http({
      url: url.getStoreCount,
      data
    })
  },
  sweepCode(data){
    return http({
      url: url.sweepCode,
      method: 'POST',
      data
    })
  },
  mystoreList(data){
    return http({
      url: url.mystoreList,
      method: 'POST',
      data
    })
  },
  queryAcctOutPage(data){
    return http({
      url: url.queryAcctOutPage,
      method: 'POST',
      data
    })
  },
  queryAcctInPage(data){
    return http({
      url: url.queryAcctInPage,
      method: 'POST',
      data
    })
  },
  updateInStat(data){
    return http({
      url: url.updateInStat+data,
      method: 'POST'
    })
  },
  getScanInfo(data){
    return http({
      url: url.getScanInfo + data,
      method: 'POST'
    })
  },
  storeGetIntros(data){
    return http({
      url: url.storeGetIntros,
      data
    })
  },
  storeGetStoreDtl(data){
    return http({
      url: url.storeGetStoreDtl,
      data
    })
  },
  getStorePics(data){
    return http({
      url: url.getStorePics,
      data
    })
  },
  changeStoreStatus(data){
    return http({
      url: url.changeStoreStatus,
      method: 'POST',
      data
    })
  },
  changeStorePrice(data){
    return http({
      url: url.changeStorePrice,
      method: 'POST',
      data
    })
  },
  getPopularSearches(data){
    return http({
      url: url.getPopularSearches+data,
    })
  },
  saveEvaluate(data){
    return http({
      url: url.saveEvaluate,
      method: 'POST',
      data
    })
  },
  evaluateList(data){
    return http({
      url: url.evaluateList,
      method: 'POST',
      data
    })
  },
  activityList(data){
    return http({
      url: url.activityList,
      method: 'POST',
      data
    })
  },
  getActivityInfo(data){
    return http({
      url: url.getActivityInfo,
      data
    })
  },
  getCustAcNum(data){
    return http({
      url: url.getCustAcNum,
      data
    })
  },
  buyAcProd(data){
    return http({
      url: url.buyAcProd,
      method: 'POST',
      data
    })
  },
  getHomepageAc(){
    return http({
      url: url.getHomepageAc,
    })
  }
}